package com.sptpc.demo.service.impl;

import com.sptpc.demo.model.Category;
import com.sptpc.demo.repository.CategoryRepository;
import com.sptpc.demo.service.ICategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryJpaService implements ICategoryService {
    @Autowired
    public CategoryRepository categoryRepository;

    @Override
    public List<Category> getAllCategories() {
        return categoryRepository.findAll();
    }
}
